package com.kfm.base.array;

import java.util.Scanner;

public class ArrayDemo01 {

    public static void main(String[] args) {
        /*
            输入 10 为同学的考试成绩并输出每位同学成绩
         */
        double[] scores = new double[10];

        Scanner sc = new Scanner(System.in);

        for (int i = 0; i < scores.length; i ++){
            System.out.printf("请输入第 %d 位同学的成绩：", i + 1);
            scores[i] = sc.nextDouble();
        }

        // 遍历数组
        for (int i = 0; i < scores.length; i ++){
            System.out.print(scores[i] + "\t");
        }


    }
}
